package com.ruoyi.web.service.impl;

import com.ruoyi.web.dto.ChargingPileHazardsDto;
import com.ruoyi.web.entity.ChargingPileHazards;
import com.ruoyi.web.mapper.ChargingPileHazardsMapper;
import com.ruoyi.web.service.IChargingPileHazardsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lqc
 * @since 2024-01-29
 */
@Service
public class ChargingPileHazardsServiceImpl extends ServiceImpl<ChargingPileHazardsMapper, ChargingPileHazards> implements IChargingPileHazardsService {

    private final ChargingPileHazardsMapper chargingPileHazardsMapper;
    public ChargingPileHazardsServiceImpl(ChargingPileHazardsMapper chargingPileHazardsMapper){
        this.chargingPileHazardsMapper = chargingPileHazardsMapper;
    }
    /**
     * 查询隐患管理
     *
     * @param id 隐患管理主键
     * @return 隐患管理
     */
    @Override
    public ChargingPileHazardsDto selectChargingPileHazardsById(Long id)
    {
        return chargingPileHazardsMapper.selectChargingPileHazardsById(id);
    }

    @Override
    public List<ChargingPileHazardsDto> selectChargingPileHazardsDtoList(ChargingPileHazards chargingPileHazards) {
        return chargingPileHazardsMapper.selectChargingPileHazardsDtoList(chargingPileHazards);
    }

    /**
     * 查询隐患管理列表
     *
     * @param chargingPileHazards 隐患管理
     * @return 隐患管理
     */
    @Override
    public List<ChargingPileHazards> selectChargingPileHazardsList(ChargingPileHazards chargingPileHazards)
    {
        return chargingPileHazardsMapper.selectChargingPileHazardsList(chargingPileHazards);
    }

    /**
     * 新增隐患管理
     *
     * @param chargingPileHazards 隐患管理
     * @return 结果
     */
    @Override
    public int insertChargingPileHazards(ChargingPileHazards chargingPileHazards)
    {
        return chargingPileHazardsMapper.insertChargingPileHazards(chargingPileHazards);
    }

    /**
     * 修改隐患管理
     *
     * @param chargingPileHazards 隐患管理
     * @return 结果
     */
    @Override
    public int updateChargingPileHazards(ChargingPileHazards chargingPileHazards)
    {
        return chargingPileHazardsMapper.updateChargingPileHazards(chargingPileHazards);
    }

    /**
     * 批量删除隐患管理
     *
     * @param ids 需要删除的隐患管理主键
     * @return 结果
     */
    @Override
    public int deleteChargingPileHazardsByIds(Long[] ids)
    {
        return chargingPileHazardsMapper.deleteChargingPileHazardsByIds(ids);
    }

    /**
     * 删除隐患管理信息
     *
     * @param id 隐患管理主键
     * @return 结果
     */
    @Override
    public int deleteChargingPileHazardsById(Long id)
    {
        return chargingPileHazardsMapper.deleteChargingPileHazardsById(id);
    }
}
